package com.example.management.mapper;

import com.example.management.pojo.Manager;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ManagerMapper {
    @Select("select * from manager")
    List<Manager> getAllManager();

    Manager login(Manager manager);


    void changeMes(Manager manager, @Param("newName") String newName, @Param("newPassword") String newPassword);

    @Insert("insert into manager(account, password, name)VALUE (#{account},#{password},#{name})")
    void signUp(Manager manager);

    void addToken(Manager manager, String token);


}
